<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?



 //การอัพโหลดไฟล์รูปภาพ
$student_image=$_FILES['student_image']['name'];
$size=$_FILES['student_image']['size'];
$temp=$_FILES['student_image']['tmp_name'];
$type=$_FILES['student_image']['type'];

 copy($temp,"photo_member/".$student_image);


$data = array("student_id"=>"$student_id",
			  	   "student_username"=>$_POST['student_username'],
				   "student_prefix"=>$_POST['student_prefix'],
				   "student_name"=>$_POST['student_name'],
				   "student_surname"=>$_POST['student_surname'],
				   "student_sex"=>$_POST['student_sex'],
				   "student_birthday"=>$_POST['student_birthday'],
				   "student_email"=>$_POST['student_email'],
				   "student_add"=>$_POST['student_add'],
				   "student_tel"=>$_POST['student_tel'],
				   "student_image"=>"$student_image",
                   "room_id"=>$_POST['room_id']
			);

$dbfunc->insert("tb_student",$data);

echo "<script>alert('ระบบได้บันทึกข้อมูลของคุณแล้วค่ะ');</script>";
echo $func->redirect("0","?module=admin&page=frm_mag_std");
?>